
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>dialog · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="navbar.html" />
    
    
    <link rel="prev" href="toast.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../../../">
            
                <a href="../../../">
            
                    
                    Introduction
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../../Chapter1/listRule.html">
            
                <a href="../../Chapter1/listRule.html">
            
                    
                    目录规范
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" >
            
                <span>
            
                    
                    书写规范
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../../Chapter1/pug/pugRules.html">
            
                <a href="../../Chapter1/pug/pugRules.html">
            
                    
                    pug规范
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1.1" data-path="../../Chapter1/pug/pugMixinRules.html">
            
                <a href="../../Chapter1/pug/pugMixinRules.html">
            
                    
                    pug-Mixin定义
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3.2" >
            
                <span>
            
                    
                    css规范
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.2.1" data-path="../../Chapter1/css/publicCss.html">
            
                <a href="../../Chapter1/css/publicCss.html">
            
                    
                    公共css定义
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2.2" data-path="../../Chapter1/css/icon.html">
            
                <a href="../../Chapter1/css/icon.html">
            
                    
                    图标定义
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2.3" data-path="../../Chapter1/css/cssAttention.html">
            
                <a href="../../Chapter1/css/cssAttention.html">
            
                    
                    css注意事项
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="../../Chapter1/js/jsRules.html">
            
                <a href="../../Chapter1/js/jsRules.html">
            
                    
                    js规范
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" >
            
                <span>
            
                    
                    组件定义
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" >
            
                <span>
            
                    
                    定义好的components
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1.1" data-path="alert.html">
            
                <a href="alert.html">
            
                    
                    alert
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.1.2" data-path="button.html">
            
                <a href="button.html">
            
                    
                    button
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.1.3" data-path="form.html">
            
                <a href="form.html">
            
                    
                    form
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.1.4" data-path="toast.html">
            
                <a href="toast.html">
            
                    
                    toast
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.4.1.5" data-path="dialog.html">
            
                <a href="dialog.html">
            
                    
                    dialog
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.1.6" data-path="navbar.html">
            
                <a href="navbar.html">
            
                    
                    navbar
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.1.7" data-path="footbar.html">
            
                <a href="footbar.html">
            
                    
                    footbar
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.1.8" data-path="swiper.html">
            
                <a href="swiper.html">
            
                    
                    swiper
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.1.9" data-path="action.html">
            
                <a href="action.html">
            
                    
                    action
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.1.10" data-path="popup.html">
            
                <a href="popup.html">
            
                    
                    popup
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.1.11" data-path="select.html">
            
                <a href="select.html">
            
                    
                    select
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.1.12" data-path="calendar.html">
            
                <a href="calendar.html">
            
                    
                    calendar
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../else/mixinData.html">
            
                <a href="../else/mixinData.html">
            
                    
                    组件渲染数据定义
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="../else/scriptTmpMixin.html">
            
                <a href="../else/scriptTmpMixin.html">
            
                    
                    template定义组件
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../../.." >dialog</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="dialog">dialog</h1>
<hr>
<h3 id="&#x63CF;&#x8FF0;">&#x63CF;&#x8FF0;</h3>
<p>&#x9488;&#x5BF9;&#x7528;&#x6237;&#x64CD;&#x4F5C;&#x4EA4;&#x4E92;&#x7684;&#x5BF9;&#x8BDD;&#x6846;</p>
<p>&#x652F;&#x6301;&#x7C7B;&#x578B;:</p>
<ul>
<li><code>alert</code></li>
<li><code>confirm</code></li>
<li><code>prompt</code></li>
<li><code>modal</code></li>
</ul>
<h3 id="demo&#x94FE;&#x63A5;">demo&#x94FE;&#x63A5;</h3>
<p><a href="../../../test.html" target="_Blank">[Demo]dialog</a></p>
<h3 id="&#x4F7F;&#x7528;&#x65B9;&#x6CD5;">&#x4F7F;&#x7528;&#x65B9;&#x6CD5;</h3>
<h4 id="alert">alert</h4>
<p>&#x6587;&#x672C;&#x63D0;&#x793A;</p>
<pre><code class="lang-js">$.alert(<span class="hljs-string">&apos;&#x5185;&#x5BB9;&apos;</span>, <span class="hljs-string">&apos;&#x6807;&#x9898;&apos;</span>, <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params"></span>) </span>{
  <span class="hljs-built_in">console</span>.log(<span class="hljs-string">&apos;&#x56DE;&#x8C03;&apos;</span>)
})
</code></pre>
<h4 id="comfirm">comfirm</h4>
<p>&#x786E;&#x8BA4;&#x64CD;&#x4F5C;</p>
<pre><code class="lang-js">
$.confirm(<span class="hljs-string">&apos;&#x5185;&#x5BB9;&apos;</span>, <span class="hljs-string">&apos;&#x6807;&#x9898;&apos;</span>, <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params"></span>) </span>{
  <span class="hljs-built_in">console</span>.log(<span class="hljs-string">&apos;&#x786E;&#x5B9A;&apos;</span>)
},<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>)</span>{
  <span class="hljs-built_in">console</span>.log(<span class="hljs-string">&apos;&#x53D6;&#x6D88;&apos;</span>)
})
</code></pre>
<h4 id="prompt">prompt</h4>
<p>&#x53EF;&#x8F93;&#x5165;&#x64CD;&#x4F5C;&#x6846;<code>(* &#x6CE8;&#x610F; prompt &#x53EF;&#x4E0E;&#x5176;&#x4ED6;&#x76F8;&#x4E92;&#x8C03;&#x7528;)</code></p>
<pre><code class="lang-js">$.prompt({
  title: <span class="hljs-string">&apos;&#x6807;&#x9898;&apos;</span>,
  text: <span class="hljs-string">&apos;&#x5185;&#x5BB9;&apos;</span>,
  onOK: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">text</span>) </span>{  <span class="hljs-comment">// &#x786E;&#x8BA4;&#x56DE;&#x8C03;</span>
    $.alert(<span class="hljs-string">&quot;&#x8F93;&#x5165;&#x5185;&#x5BB9;&#x662F;&quot;</span> + text);
  },
  onCancel: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params"></span>) </span>{ <span class="hljs-comment">// &#x53D6;&#x6D88;&#x56DE;&#x8C03;</span>
    <span class="hljs-built_in">console</span>.log(<span class="hljs-string">&quot;&#x53D6;&#x6D88;&#x4E86;&quot;</span>);
  },
  input: <span class="hljs-string">&apos;test&apos;</span>, <span class="hljs-comment">// &#x9ED8;&#x8BA4;&#x5185;&#x5BB9;</span>
  empty: <span class="hljs-literal">true</span>  <span class="hljs-comment">// &#x8F93;&#x5165;&#x5185;&#x5BB9;&#x80FD;&#x5426;&#x4E3A;&#x7A7A;(&#x9ED8;&#x8BA4; &#x5FC5;&#x586B;false)</span>
});
</code></pre>
<h4 id="modal">modal</h4>
<p>&#x591A;&#x6309;&#x94AE;&#x64CD;&#x4F5C;<code>(* &#x6CE8;&#x610F; modal &#x53EF;&#x4E0E;&#x5176;&#x4ED6;&#x76F8;&#x4E92;&#x8C03;&#x7528;)</code></p>
<pre><code class="lang-js">$.modal({
  title: <span class="hljs-string">&quot;Hello&quot;</span>,
  text: <span class="hljs-string">&quot;&#x6211;&#x662F;&#x81EA;&#x5B9A;&#x4E49;&#x7684;modal&quot;</span>,
  buttons: [
    {text: <span class="hljs-string">&quot;&#x652F;&#x4ED8;&#x5B9D;&quot;</span>, className: <span class="hljs-string">&quot;primary&quot;</span>, onClick: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params"></span>) </span>{$.alert(<span class="hljs-string">&quot;&#x4F60;&#x9009;&#x62E9;&#x4E86;&#x652F;&#x4ED8;&#x5B9D;&quot;</span>);}},
    {text: <span class="hljs-string">&quot;&#x5FAE;&#x4FE1;&#x652F;&#x4ED8;&quot;</span>, className: <span class="hljs-string">&quot;primary&quot;</span>, onClick: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params"></span>) </span>{$.alert(<span class="hljs-string">&quot;&#x4F60;&#x9009;&#x62E9;&#x4E86;&#x5FAE;&#x4FE1;&#x652F;&#x4ED8;&quot;</span>);}},
    {text: <span class="hljs-string">&quot;&#x53D6;&#x6D88;&quot;</span>, className: <span class="hljs-string">&quot;default&quot;</span>}
  ]
});
</code></pre>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="toast.html" class="navigation navigation-prev " aria-label="Previous page: toast">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="navbar.html" class="navigation navigation-next " aria-label="Next page: navbar">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"dialog","level":"1.4.1.5","depth":3,"next":{"title":"navbar","level":"1.4.1.6","depth":3,"path":"src/Chapter2/mixin/navbar.md","ref":"src/Chapter2/mixin/navbar.md","articles":[]},"previous":{"title":"toast","level":"1.4.1.4","depth":3,"path":"src/Chapter2/mixin/toast.md","ref":"src/Chapter2/mixin/toast.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["livereload"],"pluginsConfig":{"livereload":{},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"src/Chapter2/mixin/dialog.md","mtime":"2019-01-24T07:35:35.932Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-01-25T09:10:09.700Z"},"basePath":"../../..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../../../gitbook/gitbook.js"></script>
    <script src="../../../gitbook/theme.js"></script>
    
        
        <script src="../../../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

